<form action="<%=request.getAttribute("formAction")%>" method="post" class="movieform">
    <input name="action" type="hidden" value="payment" />
    <div class="Mt">
        <h4>Payment Method:</h4>
        <h4>(According to the requirement of this assignment, the payment using credit card is not available)</h4>
        <h4>(If you would like to use credit card, just click "Confirm Payment")</h4>
        <div>
            <label>Credit Card</label><input type="radio" checked="checked" name="paymentMethod" value="creditCard" />
       	</div>
        <div>
            <label>Loyalty Point</label>
            <%
                        Integer nLoyaltyPoint = (Integer) session.getAttribute("loyaltyPoint");
                        if (nLoyaltyPoint == null) {
                            nLoyaltyPoint = 0;
                        }
                        Integer nTotalPayment = (Integer) session.getAttribute("totalPayment");
                        if (nTotalPayment <= nLoyaltyPoint) {
            %>
            <input type="radio" name="paymentMethod" value="loyaltyPoint" />
            <%                } else {
            %>
            <input type="radio" name="paymentMethod" value="loyaltyPoint" disabled="disabled"/>
            <%                    }
            %>
        </div>
        <div>
            <label>Total Payment:</label>
            <input type="text" value=<%= session.getAttribute("totalPayment")%> readonly="readonly" style="background:gray" />
        </div>
        <div>
            <label>Available Loyalty Points: </label>
            <input type="text" value=<%=session.getAttribute("loyaltyPoint")%> readonly="readonly" style="background:gray" />
        </div>

        <div class="button">
            <input type="submit" value="Confirm Payment" />
        </div>
    </div>
</form>
